/**
 * @name: index
 * @author: zhangYuanTao
 * @date: 2021-07-14 16:10
 * @description：描述
 * @update: 2021-07-14 16:10
 */

import React, { memo } from 'react';
import { DiscoverWrapper, TopMenu } from './style'
import { discoverMenu } from "../../common/local-data"
import { NavLink } from "react-router-dom";
import { renderRoutes } from "react-router-config";

export default memo(function ZYTDiscover(props) {


  const { route } = props;
  return (
    <DiscoverWrapper>
      <div className="top">
        <TopMenu className="wrap-v1">
          {
            discoverMenu.map((item, i) => {
              return (
                <div className="item" key={ item.title }>
                  <NavLink to={ item.link }>{ item.title }</NavLink>
                </div>
              )
            })
          }
        </TopMenu>
      </div>
      { renderRoutes(route.routes) }
    </DiscoverWrapper>
  )
})

